from kafka import KafkaProducer

if __name__ == '__main__':
    producer = KafkaProducer(bootstrap_servers="master:9092,node1:9092,node2:9092")

    producer.send(topic="bigdata", value="python".encode("utf-8"))

    producer.flush()

    producer.close()
